<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>公司注册 - {$Config.sitename}</title>
<link type="text/css" rel="stylesheet" href="/statics/job/css/jxjy.css" />
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/statics/job/js/getToday.js"></script>
<script type="text/javascript" src="/statics/job/js/selectmoni.js"></script>
<!--<script type="text/javascript" src="/statics/job/js/js/common.js"></script>-->
<script src="/statics/job/js/js/Area.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="/statics/job/css/style.css" />
<script src="/statics/job/js/Validform_v5.3.2_min.js" ></script>
<script src="/statics/job/js/ajaxupload.3.5.js" ></script>
<script type="text/javascript" src="/statics/js/laydate/laydate.js"></script>
<script type="text/javascript" src="/statics/js/layer/layer.js"></script>
<!--<script type="text/javascript" src="/statics/js/area.js"></script>-->
</head>

<body>
<div class="jxjymain">
	<!--header<start>-->
    <template file="Content/header.php"/>
    <!--header<end>-->
    <div id="com_reg_form">
    <div id="comregbg"></div>

    
    <form action="{:U('Member/Public/doRegister')}" method="post" id="addcompany">

    <div class="com_title">账号信息</div>
    <table  width="100%" class="com_reg_table" border="1">
      <tr>
        <td width="42%" align="right">账号：</td>
        <td width="58%"><input name="username" type="text" class="member_input" datatype="s4-18" errormsg="请输入4-18位账号名" nullmsg="账号名必填" /></td>
      </tr>
       <tr>
        <td width="42%" align="right">密码：</td>
        <td width="58%"><input type="password" name="password" class="member_input password " datatype="*6-16" nullmsg="请设置密码！" errormsg="密码范围在6~16位之间！"/></td>
      </tr>
         <tr>
        <td width="42%" align="right">确认密码：</td>
        <td width="58%"><input type="password" class="member_input password2" datatype="*" recheck="password" nullmsg="请再输入一次密码！" errormsg="您两次输入的账号密码不一致！" /></td>
      </tr>
      <!--  <tr>
        <td width="42%" align="right">手机号码：</td>
        <td width="58%"><input type="text" class="member_input" datatype="m" /></td>
      </tr>-->
     <!--   <tr>
        <td width="42%" align="right">输入收到的短信验证码：</td>
        <td width="58%"><input type="text" class="member_input" /></td>
      </tr>-->
    </table>

    <div class="com_title">公司信息</div>
    
    <table  width="100%" class="com_reg_table" border="1">
      <tr>
        <td width="42%" align="right">公司名称：</td>
        <td width="58%"><input name="info[f_name]" type="text" class="member_input" datatype="s" errormsg="请填写公司名称!" nullmsg="公司名称必填!" /></td>
      </tr>
        <tr>
            <td width="42%" align="right">营业执照：</td>
            <td width="58%">
                <a href="#" id="upload_button"  class="addicon ">
                    <img width="125" height="94" id="carimg" src="" style="display: none;margin-left: 15px;"/>
                    &nbsp;&nbsp;<span id="file">上传营业执照</span>
                </a>
                <input  name="info[f_license]" type="hidden" id="take_one" value="">
            </td>
        </tr>
       <tr>
        <td width="42%" align="right">公司规模：</td>
        <td width="58%">
            {:category_menu('job_scale','info[f_scale]')}
           <!-- <select name="select" class="com_select member_input" datatype="s">
                <option>请选择...</option>
            </select>-->
        </td>
      </tr>
         <tr>
        <td width="42%" align="right">所在地区：</td>
        <td width="58%">
            {:ajax_area_select('info[f_regionID]','选择地区',1)}
        </td>
      </tr>
        <tr>
        <td width="42%" align="right">公司性质：</td>
        <td width="58%">
            {:category_menu('job_company_type',"info[f_nayure]")}
        </td>
      </tr>
        <tr>
        <td width="42%" align="right">成立日期：</td>
        <td width="58%"><input name="info[f_setupdate]" type="text" class="member_input" datatype="*" onClick="laydate({istime: true, format: 'YYYY-MM-DD'})" /></td>
      </tr>
        <tr>
        <td width="42%" align="right">注册资金：</td>
        <td width="58%"><input name="info[f_money]" type="text" class="member_input" datatype="n" /> 万</td>
      </tr>
        <tr>
        <td width="42%" align="right">公司简介：</td>
        <td width="58%">
          <textarea name="info[f_abstract]" class="com_textarea" datatype="*20-140"></textarea></td>
      </tr>
    </table>
    
    <div class="com_title">联系方式</div>
    
    <table  width="100%" class="com_reg_table" border="1">
      <tr>
        <td width="42%" align="right">联系人：</td>
        <td width="58%"><input name="info[f_firmperson]" type="text" class="member_input"   datatype="s2-10" /></td>
      </tr>
       <tr>
        <td width="42%" align="right">联系电话：</td>
        <td width="58%"><input name="info[f_phone]" type="text" class="member_input" datatype="m" /></td>
      </tr>
         <tr>
        <td width="42%" align="right">传真：</td>
        <td width="58%"><input name="info[f_fax]" type="text" class="member_input" datatype="s6-18" /></td>
      </tr>
        <tr>
        <td width="42%" align="right">公司网址：</td>
        <td width="58%"><input name="info[f_firmurl]" type="text" class="member_input" datatype="url" /></td>
      </tr>
        <tr>
        <td width="42%" align="right">电子邮件：</td>
        <td width="58%"><input name="email" type="text" class="member_input" datatype="e" /></td>
      </tr>
        <tr>
          <td align="right">邮编：</td>
          <td><input name="info[f_code]" type="text" class="member_input" datatype="p" /></td>
        </tr>
        <tr>
            <td width="42%" align="right">公司地址：</td>
            <td width="58%"><input placeholder="标记地图后可自动获取地址信息" name="info[f_location]" id="f_location" type="text" class="member_input" datatype="s"/></td>
        </tr>
      <tr>
        <td width="42%" align="right">电子地图：</td>
        <td width="58%">
            <a href="javascript:;" onClick="iframe();"  class="mark_map">点击标记地图</a>
            <input type="hidden" name="info[f_coordinate]" id="zuobiao" />
            <input type="hidden" name="modelid" value="4"/>
        </td>
      </tr>

       <tr>
          <td align="right">&nbsp;</td>
          <td ></td>
        </tr>
        <tr>
          <td align="right">&nbsp;</td>
          <td><input type="submit" class="member_btn" value="注册"></td>
        </tr>
    </table>
     </form>
    </div>
      
    
    <div class="clear"></div>
    
    <template file="Content/footer.php"/>
</div>

</body>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=B3f7707c25da5b29a6ff69618788a296"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
<script type="text/javascript">
    $("#addcompany").Validform({
        tiptype:3,
        showAllError:true,
        postonce:true,
        ajaxPost:false

    });
function iframe(){
    layer.open({
        type: 2,
        title:'点击标注地图坐标',
        area: ['715px', '550px'],
        //fix: false, //不固定
        //maxmin: true,
        skin: 'layui-layer-rim', //加上边框
        content:['/statics/map/map_api.html','no']
    });
}
    ajaxUpload(
        'upload_button', //上传的按钮id名称
        2044,  //允许上传的文件大小（单位：kb）
        '/statics/upload.php?form_name=userfile&file_size=2048', //提交服务器端地址
        'userfile', //提交服务器文件表单名称
        "$(\"#carimg\").show();$(\"#carimg\").attr('src', obj.filename);$(\"#take_one\").val(obj.filename);$(\"#file\").html('重新上传')",
        'loadimg'  //loading 图片id
    );
    /**

     * Ajax 无刷新上传图片（jpg|gif|png）

     * @param string id_name id名称

     * @param int filesize 文件大小 k 为单位

     * @param string url   提交服务器端地址

     * @param string filename 提交服务器文件表单名称

     * @param string callback 上传成功运行代码

     * @param string loadingid loading 图片id名称

     * @return json

     */

    function ajaxUpload(id_name, filesize, url, filename, callback, loadingid) {
        var button = $('#'+id_name), interval;
        var fileType = "pic", fileNum = "one";
        new AjaxUpload(button,{
            action: url,
            name: filename,
            onSubmit : function(file, ext){
                if(fileType == "pic") {
                    if (ext && /^(jpg|png|jpeg|gif)$/.test(ext)){
                        this.setData({
                            'info': '文件类型为图片'
                        });
                    } else {
                        alert('提示：您上传的是非图片类型！');
                        return false;
                    }
                }
                $("#"+loadingid).show();
                if(fileNum == 'one') this.disable();
            },
            onComplete: function(file, response){
                eval("var obj="+response);
                if (obj.ok) {
                    eval(callback);
                } else {
                    switch (response) {
                        case '1':
                            alert('提示：上传失败，图片不能大于'+filesize+'k！');
                            break;
                        case '3':
                            alert('提示：图片只有部分文件被上传，请重新上传！');
                            break;
                        case '4':
                            alert('提示：没有任何文件被上传！');
                            break;
                        case '5':
                            alert('提示：非图片类型，请上传jpg|png|gif图片！');
                            break;
                        default:
                            alert('提示：上传失败，错误未知，请您及时联系网站客服人员！');
                            break;
                    }
                }
                $("#"+loadingid).hide();
                window.clearInterval(interval);
                this.enable();
            }
        });
    }
</script>
</html>
